/*
 * @Descripttion: 调拨业务
 * @version: V1.0
 * @Author: GaoWei
 * @Date: 2021-07-14 17:57:38
 * @LastEditors: GW
 * @LastEditTime: 2021-12-20 09:57:38
 */
import { axios } from '../../utils/request'

const api = {
    save: '/inOut/allocationMain/save',
    examine: '/inOut/allocationMain/examine',
    delete: '/inOut/allocationMain/delete',
    getcode: '/inOut/allocationMain/getCode',
    approval: '/inOut/allocationMain/approval',//批准
    yes: '/inOut/allocationMain/allot',//确认调拨
    return: '/inOut/allocationMain/returnBack',//退单
}
/**
 * 保存
 */
export function save (data) {
    return axios({
        url: api.save,
        method: "post",
        data: data
    })
}

/**
 * 审核
 */
export function examine (data) {
    return axios({
        url: api.examine,
        method: "get",
        params: data
    })
}

/**
 * 删除
 */
export function remove (data) {
    return axios({
        url: api.delete,
        method: "DELETE",
        params: data
    })
}

/**
 * 获取单据编号
 */
export function getCode (data) {
    return axios({
        url: api.getcode,
        method: "get",
        params: data
    })
}

/**
 * 调拨
 */
export function allot (data) {
    return axios({
        url: api.yes,
        method: "get",
        params: data
    })
}

/**
 * 批准
 */
export function approval (data) {
    return axios({
        url: api.approval,
        method: "get",
        params: data
    })
}

/**
 * 退单
 */
export function returnBack (data) {
    return axios({
        url: api.return,
        method: "get",
        params: data
    })
}


/**
 * 提交单据
 */
export function submitOrder (data) {
    return axios({
        url: '/inOut/allocationMain/submit',
        method: "get",
        params: data
    })
}
